.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px;
}

.media-card {
    border: 1px solid #e4e7ed;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    width: 246px;
    position: relative;
}

.media-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transform: translateY(-4px);
}

.media-card.selected {
    border: 2px solid #409eff;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.media-card.selected::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: #409eff;
    border-radius: 50%;
    z-index: 10;
}

.media-card.selected::before {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 12px;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    z-index: 11;
}

.media-image-container {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f8f9fa;
}

.media-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.media-image:hover {
    transform: scale(1.05);
}

.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.media-card:hover .media-overlay {
    opacity: 1;
}

.media-info {
    padding: 15px;
    cursor: pointer;
}

.media-filename {
    font-size: 14px;
    font-weight: 500;
    color: #303133;
    margin-bottom: 8px;
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.media-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #909399;
    margin-bottom: 6px;
}

.media-size {
    font-size: 12px;
    color: #67c23a;
    font-weight: 500;
}

.media-dimensions {
    font-size: 12px;
    color: #409eff;
}

/* 列表视图样式 */
.media-list {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin: 20px;
}

.media-list-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    cursor: pointer;
    position: relative;
}

.media-list-item:hover {
    background-color: #f8f9fa;
}

.media-list-item:last-child {
    border-bottom: none;
}

.media-list-item.selected {
    background-color: #ecf5ff;
    border-left: 3px solid #409eff;
}

.media-list-item.selected::after {
    content: '✓';
    position: absolute;
    right: 20px;
    color: #409eff;
    font-weight: bold;
    font-size: 16px;
}

.media-list-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 15px;
    cursor: pointer;
    border: 1px solid #e4e7ed;
}

.media-list-info {
    flex: 1;
}

.media-list-filename {
    font-size: 14px;
    font-weight: 500;
    color: #303133;
    margin-bottom: 4px;
}

.media-list-meta {
    font-size: 12px;
    color: #909399;
}

/* 工具栏样式 */
.media-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #fff;
    border-bottom: 1px solid #e4e7ed;
    margin-bottom: 0;
}

.view-toggle {
    display: flex;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    overflow: hidden;
}

.view-toggle-btn {
    padding: 8px 12px;
    background: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #606266;
}

.view-toggle-btn.active {
    background: #409eff;
    color: #fff;
}

.view-toggle-btn:hover:not(.active) {
    background: #f5f7fa;
}

/* 预览对话框样式 */
.preview-dialog .el-dialog__body {
    text-align: center;
    padding: 20px;
    background: #000;
}

.preview-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #909399;
}

.empty-icon {
    font-size: 64px;
    color: #c0c4cc;
    margin-bottom: 20px;
}
.el-pagination.is-background{
    padding:0px !important;
}

/* 选中计数器样式 */
.selected-counter {
     
    color: #000;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    margin-right: 10px;
}